﻿using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Christoc.Modules.CouponsDiscounts.Components
{
    public class Discount //: ContentItem
    {
        public int DiscountID { get; set; }
        public string Name { get; set; }
        public double Value { get; set; }
        public DateTime BeginDate { get; set; }
        public DateTime EndDate { get; set; }
        public TypeDiscount Type { get; set; }

        /*
        public override void Fill(System.Data.IDataReader dr)
        { 
            base.FillInternal(dr);

            DiscountID = Null.SetNullInteger(dr["DiscountID"]);
            Name = Null.SetNullString(dr["Name"]);
	        Value = Null.SetNullInteger(dr["Value"]);
	        BeginDate = Null.SetNullDateTime(dr["BeginDate"]);
	        EndDate = Null.SetNullDateTime(dr["EndDate"]);
	        Type = (TypeDiscount)Null.SetNullInteger(dr["Type"]);
        }

        public override int KeyID
        {
            get
            {
                return DiscountID;
            }
            set
            {
                DiscountID = value;
            }
        }*/
    }

    public enum TypeDiscount
    {        
        Amount,
        Percentage,
        Count,
        OneUse,
    }

}